<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="主页demo/js/jquery-3.6.0.min.js"></script>
		<script src="./js/layui/layui.js"></script>
		<link rel="stylesheet" href="./js/layui/css/layui.css" />
		<link rel="stylesheet"  href="css/base.css"/>
		<link rel="stylesheet" href="css/common.css" />
		<style>
			@media screen and (min-width: 0px) {
				.editmain{
					width: 100%;
					
					height: 5rem;
					margin-top: 1rem;
				}
			}
			@media screen and (min-width: 750px) {
					.editmain{
						width: 70%;
						
						height: 5rem;
						margin: 1rem auto;
					}
			}
			.scpicture{
				width: 1.3rem;height: 0.4rem;text-align: center;font-size: 0.14rem;background-color: #5ED776;border-radius: 0.1rem;color: white
			}
			button:hover{
				cursor: pointer;
			}
			.editmain>div{
				width: 100%;
				
				padding: 0.1rem 0;
				
			}
			.title{
				font-size: 0.3rem;
				border-bottom: 1px solid #CCCCCC;
				
			}
			.editName input,.editPassword input{
				width: 100%;
				border-radius:0.05rem ;
				border: 0.01rem solid #CCCCCC;
				height: 0.3rem;
				padding: 0px 0.05rem;
				
			}
			.editAbout textarea{
				width: 100%;
				border-radius:0.05rem ;
				border: 0.01rem solid #CCCCCC;
				height: 0.6rem;
				padding: 0px 0.05rem;
			}
			 .editmain span{
				 font-weight: 550;
				 font-size: 0.14rem;
				
			 }
			 .submit{
				  font-size: 0.12rem;
				width: 0.8rem;
				height: 0.3rem;
				text-align: center;
				font-size: 0.14rem;
				background-color: white;
				border-radius: 0.05rem;color:black;
				border: 0.01rem solid #CCCCCC;
			 }
		</style>
	</head>
	<body>
		
			<div class="editmain">
				<div class="title">编辑个人资料</div>
				<div class="facePicture">
					<button type="button"  id="test1" class="scpicture">
					  <i class="layui-icon" style="font-size: 0.14rem">&#xe67c;</i>上传头像
					</button>
				</div>
				<div class="editName">
					<span>编辑姓名</span>
					<div><input type="text" name="editNameText" id="" value="" placeholder=""/></div>
				</div>
				<div class="editPassword">
					<span>重置密码</span>
					<div><input type="text" name="editNameText" id="" value="" placeholder=""/></div>
				</div>
				<div class="editAbout">
					<span>个人详情</span>
					<textarea></textarea>
				</div>
				<div>
					<button class="submit">提交</button>
				</div>
			</div>
			
			
			
	
	
	   
	
	  
		
		
			
		
		
		
		
		
		
		
		
		
		
		<script>
			layui.use('upload', function(){
			  var upload = layui.upload;
			   
			  //执行实例
			  var uploadInst = upload.render({
			    elem: '#test1' //绑定元素
			    ,url: 'http://localhost:3030/faceimgUser' //上传接口
			    ,accept:"file"
				,done: function(res){
					console.log(res)
			     setTimeout(function(){
						$.ajax({
						          //请求方式
						          type : "POST",
						         
						          //请求地址
						          url : "http://localhost:3030/editUser",
						          
						          data :{username:"李四",password:"4444",account:"9106548827",contents:"牛马一号"},
						          //请求成功
						          success : function(result) {
						              console.log(result);
						          },
						          //请求失败，包含具体的错误信息
						          error : function(e){
						              console.log(e.status);
						              console.log(e.responseText);
						          }
						      });
				 },1000)
			
				 
			    }
			    ,error: function(err){
					
			      //请求异常回调
			    }
			  });
			});
		</script>
	</body>
</html>
